<?php #Кнопки 
class buttons extends Load_use
{
	private $styles=array(
		'send'=>'orange',
		'ok'=>'ok',
		'add'=>'blue add hidden',
		'add2'=>'blue add',
	);
	function getBlock()
	{
		$type=$this->getParam('type','button');
		$style=$this->getParam('style','ok');
		$attr=$this->getParam('attr',false);
		$style=isset($this->styles[$style])?$this->styles[$style]:$this->styles['ok'];
		$text=$this->getParam('text','ОК');
		$link=$this->getParam('link',false);
		if($link)
			$attr.=' onclick="goByUrl(\''.$link.'\')"';
		return '<button type="'.$type.'" '.$attr.' class="button '.$style.'"><div>'.$text.'</div></button>';
	}
}